package com.qingcloud.adminbackend.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qingcloud.adminbackend.entity.usergroup.*;
import com.qingcloud.adminbackend.entity.usergroup.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 新用户组 服务类
 * </p>
 *
 * @author wangjinnan
 * @since 2018-11-15
 */
public interface ISysUsergroupService extends IService<SysUsergroup> {

    /**
     * 添加用户组
     */
    int add(SysUsergroup sysUsergroup);

    /**
     * 修改用户组
     */
    int modify(SysUsergroup sysUsergroup);

    /**
     * 根据用户组ID删除用户组
     */
    int deleteById(String ids);

    /**
     * 分页查询用户组
     *
     * @param param       动态参数
     * @param loginUserId 当前登录用户ID
     * @return
     */
    IPage<SysUsergroupDTO> page(SysUsergroupPageParam param, HttpServletRequest request);

    /**
     * 分页查询用户组下成员
     *
     * @param param
     * @return
     */
    IPage<SysUsergroupUserDTO> userPage(SysUsergroupUserParam param);

    /**
     * 获取用户组列表
     */
    List<SysUsergroupDTO> getUserGroupList(String orgId, String groupName);

    List<SysUsergroupDTO> getUserGroupByUserId(String userId);

    SysUsergroup queryInfo(String id);

}
